package com.gitee.zhengjiasen.dp.state.demo1;

public class StateOff extends StateBubble {

    private Bubble bubble;

    public StateOff(Bubble bubble) {
        super.describe = "电灯关闭";
        this.bubble = bubble;
    }


    @Override
    public void on() {
        System.out.println("电灯on");
        bubble.setStateBubble(bubble.getStateOn());
    }

    @Override
    public void off() {
        System.out.println("灯泡已经关闭");
    }
}
